<app-content-header>
</app-content-header>

<app-detail-header
  [title]="'TRADE.TITLE.DETAIL.BATCH' | i18n"
  [ifEditable]="false"></app-detail-header>
<div class="cil-table-block">
    <nz-table #basicTable [nzData]="transData" [nzScroll]="{ x: '900px' }" nzShowQuickJumper="true">
        <thead>
          <tr>
            <th nzWidth="150px" class="cil_display_center" nzLeft="0px">{{ 'TRADE.BATCHNUM' | translate }}</th>
            <th nzWidth="150px" class="cil_display_center">{{'TRADE.ORDER_NUM'|translate}}</th>
            <th nzWidth="150px" class="cil_display_center">{{ 'GENERAL.STORE.NAME' | translate}}</th>
            <th nzWidth="150px" class="cil_display_center">{{ 'GENERAL.TERMINAL.CODE' | translate}}</th>
            <th nzWidth="150px" class="cil_display_center">{{ 'TRADE.TRANS_TIME' | translate}}</th>
            <th nzWidth="150px" class="cil_display_center">{{'TRADE.TRANS_AMT' | translate}}</th>
            <th nzWidth="150px" class="cil_display_center">{{ 'TRADE.SETTLE.STATUS' | translate }}</th>
            <th class="special_th_checkbox"  nzWidth="200px" nzRight="0px" nzShowCheckbox
              nzShowRowSelection
              [nzSelections]="listOfSelection"
              [(nzChecked)]="isAllDisplayDataChecked"
              [nzIndeterminate]="isIndeterminate"
              (nzCheckedChange)="checkAll($event)" ></th>
          </tr>
        </thead>
        <tbody>
          <tr *ngFor="let item of basicTable.data">
            <td nzLeft="0px" class="cil_display_center">{{ item.batchNum }}</td>
            <td class="cil_display_center">{{ item.orderNum }}</td>
            <td class="cil_display_center">{{ item.storeName }}</td>
            <td class="cil_display_center">{{ item.terminalid }}</td>
            <td class="cil_display_center">{{ switchTimeFormat(item.createdAt) }}</td>
            <td class="cil_display_center">{{ computeTransAmt(item) | amtFormat: item.currency | async }}</td>
            <td class="cil_display_center" >{{item.settFlag?'TRADE.SETTLE.SETTLED':'TRADE.SETTLE.UNSETTLED'| translate}}</td>
            <td class="special_checkbox" nzRight="0px" nzShowCheckbox [(nzChecked)]="mapOfCheckedId[item.orderNum]" (nzCheckedChange)="refreshStatus()"></td>
          </tr>
        </tbody>
    </nz-table>
    <div  #btns class="cil-custom-btns">
        <button
        class="cil__custom-btn__whiteblue"
        nz-col
        nz-button
        (click)="goLeave()"
        nzShape="round">{{'BTN.CANCEL' | i18n}}</button>
      <button
        acl
        class="cil__custom-btn__lightblue"
        nz-button
        nzType="primary"
        nzShape="round"
        nzSize="default"
        (click)="next()"
      >
        {{ 'BTN.NEXT_STEP' | i18n }}
      </button>
    </div>
    
</div>


